package cn.edu.zjicm.wordsnet_d.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import cn.edu.zjicm.wordsnet_d.R;
import cn.edu.zjicm.wordsnet_d.activity.base.WordBaseActivity;
import cn.edu.zjicm.wordsnet_d.view.Cells;

import com.umeng.analytics.MobclickAgent;

public class WordsFmDegreeActivity extends WordBaseActivity {
	private Cells cells;

	public static void startActivity(Context context) {
		Intent intent = new Intent(context, WordsFmDegreeActivity.class);
		context.startActivity(intent);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitleBarStyle(TITLE_BAR_STYLE_BACK_BUTTON);
		setTitleText("词汇学习熟悉度统计");
		setContentView(R.layout.activity_words_fm_degree);

		cells = (Cells) findViewById(R.id.cells);
		hideRightButton1();
		// setRightButton1(null, R.drawable.title_bar_share_button_selector, new
		// OnClickListener() {
		// @Override
		// public void onClick(View v) {
		// new ShareDialog(WordsFmDegreeActivity.this,
		// getWindowManager().getDefaultDisplay().getWidth(), "WECHATMODE3");
		// }
		// });

	}

	// 结束测试，进入TestEndActivity
	private void stopTest() {
		finish();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		boolean consumed = false;
		switch (keyCode) {
		case KeyEvent.KEYCODE_BACK:
			stopTest();
		}
		return consumed;
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		MobclickAgent.onResume(this);
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		MobclickAgent.onPause(this);
	}
}
